home *** CD-ROM | disk | FTP | other *** search
/ Galleria D'arte: Manet / Manet.iso / Dati / Memo.dxr / 00007_ID risposta.ls < prev    next >
Encoding:
Text File  |  2000-12-21  |  1.9 KB  |  75 lines

  1. property pID
  2.  
  3. on getPropertyDescriptionList
  4.   propertyDescriptionList = [#pID: [#comment: "ID risposta", #range: [1, 2, 3], #format: #integer, #default: 1]]
  5.   return propertyDescriptionList
  6. end
  7.  
  8. on mouseUp me
  9.   global gPunteggio, gNumeroDomanda, gRispostaSbagliata
  10.   cursor(-1)
  11.   dati = line gNumeroDomanda of field "dati"
  12.   good = item 6 of dati
  13.   delete char 1 to 3 of good
  14.   if pID = good then
  15.     nascondisbagliate()
  16.     tmp = the member of sprite the currentSpriteNum
  17.     set the foreColor of field tmp to 11
  18.     quadro = item 2 of dati
  19.     delete char 1 to 3 of quadro
  20.     sprite(20).visible = 1
  21.     set the member of sprite 20 to member(quadro)
  22.     sprite(20).visible = 1
  23.     sprite(21).visible = 0
  24.     suonook(gRispostaSbagliata)
  25.     startTimer()
  26.     cursor(4)
  27.     repeat with i = 1 to the maxinteger
  28.       if the timer < (60 * 5) then
  29.         nothing()
  30.         next repeat
  31.       end if
  32.       go(3)
  33.       exit repeat
  34.     end repeat
  35.     cursor(-1)
  36.     if gRispostaSbagliata = 0 then
  37.       gPunteggio = gPunteggio + 1
  38.     end if
  39.     domanda()
  40.     visualizzadomanda()
  41.   else
  42.     gRispostaSbagliata = gRispostaSbagliata + 1
  43.     sprite(the currentSpriteNum).visible = 0
  44.     suonono()
  45.     if gRispostaSbagliata = 2 then
  46.       repeat with i = 1 to 3
  47.         set the foreColor of field ("risposta" & i) to 11
  48.       end repeat
  49.       go(3)
  50.       domanda()
  51.       quadro = item 2 of dati
  52.       delete char 1 to 3 of quadro
  53.       sprite(20).visible = 1
  54.       set the member of sprite 20 to member(quadro)
  55.       sprite(20).visible = 1
  56.       sprite(21).visible = 0
  57.       updateStage()
  58.       startTimer()
  59.       cursor(4)
  60.       repeat with i = 1 to the maxinteger
  61.         if the timer < (60 * 5) then
  62.           nothing()
  63.           next repeat
  64.         end if
  65.         repeat with p = 1 to 3
  66.           set the foreColor of field ("risposta" & p) to 0
  67.         end repeat
  68.         visualizzadomanda()
  69.         exit repeat
  70.       end repeat
  71.       cursor(-1)
  72.     end if
  73.   end if
  74. end
  75.